package com.cnap.multiclouldmgmt.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * 内存使用的情况
 *
 * @author xc
 **/
@ApiModel(value = "com.cnap.multiclouldmgmt.model.BasicValueModel",description = "基础的时间和value")
public class BasicValueModel {

    //recordTime
    @ApiModelProperty(value = "recordTime")
    private Date recordTime;

    //时间戳
    @ApiModelProperty(value = "记录时间戳")
    private long recordTimestamp;

    //记录值
    @ApiModelProperty(value = "value")
    private String value;

    /**
     * get
     *
     * @return RecordTime
     */
    public Date getRecordTime() {
        return recordTime;
    }

    /**
     * set
     *
     * @param recordTime recordTime
     */
    public void setRecordTime(Date recordTime) {
        this.recordTime = recordTime;
    }

    /**
     * get
     *
     * @return RecordTimestamp
     */
    public long getRecordTimestamp() {

        if (recordTime != null){
            return recordTime.getTime();
        }

        return recordTimestamp;
    }

    /**
     * set
     *
     * @param recordTimestamp recordTimestamp
     */
    public void setRecordTimestamp(long recordTimestamp) {
        this.recordTimestamp = recordTimestamp;
    }

    /**
     * get
     *
     * @return Value
     */
    public String getValue() {
        return value;
    }

    /**
     * set
     *
     * @param value value
     */
    public void setValue(String value) {
        this.value = value;
    }
}
